#include <iostream>
#include <vector>

int func() {
    return rand();
}

int main() {
    if (auto a = func(); a != 0) {
        std::cout << "a: " << a << "\n";
    }

    std::vector<int> vec = {1, 2, 3, 4};
    if (auto itr = std::find(vec.begin(), vec.end(), 3); itr != vec.end()) {
        *itr = 4;
    }
    std::cout << "=====" << std::endl;
    for (auto element : vec) {
        std::cout << element << std::endl; // read only
    }
    for (auto &element : vec) {
        element += 1; // writeable
    }
    std::cout << "=====" << std::endl;
    for (auto element : vec) {
        std::cout << element << std::endl; // read only
    }
    return 0;
}